package com.doucome.snapshot.view 
{
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	/**
	 * ...
	 * @author wkl
	 */
	public class WaitEffect extends MovieClip 
	{
		private var _mask:Sprite;
		private var _btn:SimpleButton;
		public function WaitEffect() 
		{
			
			
			_mask = new Sprite();
			_mask.graphics.beginFill(0x000000, 100);
			_mask.graphics.drawRect(0, 0, 760, 580);
			_mask.alpha = 0.7;
			_mask.visible = true;
			addChild(_mask);
		    setChildIndex(_mask, 0);
			
			_btn = getChildByName("btn_close") as SimpleButton;
			//_btn.buttonMode = true;
			_btn.addEventListener(MouseEvent.CLICK, closeWait);
			
		}
		
		private function closeWait(e:MouseEvent):void 
		{
			close();
		}
		
		public function show():void 
		{
			this.visible = true;
			
		}
		
		public function close():void 
		{
			this.visible = false;
		}
	}

}